import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class E07_TestList {

	public static void main(String[] args) {
		IDClass[] ids = new IDClass[10];
		for (int i = 0; i < ids.length; i++) {
			ids[i] = new IDClass();
		}
		List<IDClass> lst = new ArrayList<IDClass>(Arrays.asList(ids));
		System.out.println(lst);
		List<IDClass> sub = lst.subList(lst.size() / 4, lst.size() / 2);
		System.out.println("sub" + sub);
		lst.removeAll(sub);
		System.out.println(lst);
	}

}

class IDClass {
	private static int counter;
	private final int count = counter++;

	@Override
	public String toString() {
		return "Test: " + count;
	}
}